import request from '@/utils/request'

const listPage = function(pageNum, pageSize) {
  return request({
    url: '/numberrule/listPage?pageNum=' + pageNum + '&pageSize=' + pageSize,
    method: 'post',
    data: {}
  })
}

const save = function(numberRuleData) {
  return request({
    url: '/numberrule/save',
    method: 'post',
    data: numberRuleData
  })
}

const update = function(numberRuleData) {
  return request({
    url: '/numberrule/update',
    method: 'post',
    data: numberRuleData
  })
}

const deleteRule = function(ids) {
  return request({
    url: '/numberrule/delete',
    method: 'post',
    data: {
      ids: ids
    }
  })
}

export const ruleApi = {
  listPage: listPage,
  save: save,
  update: update,
  deleteRule: deleteRule
}
